<!--
  @author duanzuocai
  @since 2018/10/23 15:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid">

  <div class="layui-card">

    <div class="layui-card-body">

      <!--表单样式统一为layui-form(必需样式)，lay-filter属性统一定义为zmn-form-->
      <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

        <input type="hidden" name="categId" th:value="${categ.categId}"/>
        <div class="layui-form-item">
          <label class="layui-form-label layui-form-required">二级分类名称：</label>
          <div class="layui-input-inline" style="width:200px;">
            <input type="text" lay-verify="required|name" name="name" th:value="${categ.name}" autocomplete="off" class="layui-input" maxlength="20"/>
            <!--表单说明置于表单元素后方-->
          </div>
        </div>

        <div class="layui-form-item">
          <label class="layui-form-label layui-form-required">二级分类icon：</label>
          <div class="layui-upload-drag" id="icon">
            <input type="hidden" lay-verify="required" id="iconValue" name="icon">
            <i class="layui-icon"></i>
            <p>点击上传</p>
          </div>
          <div class="layui-inline" style="    width: 200px;">
            <i onclick="deleteImg('icon')"  class="layui-icon layui-icon-delete btn-del funcClass"></i>
            <br>
            <span style="color: #9F9F9F;">建议上传尺寸：360*360，支持png/jpg/gif格式，小于1M，用于：前端店铺二级分类icon展示</span>
          </div>
        </div>

<!--        <div class="layui-form-item">-->
<!--          <label class="layui-form-label">详情页名称：</label>-->
<!--          <div class="layui-input-inline">-->
<!--            <input type="text" name="detailName" autocomplete="off" maxlength="20" class="layui-input" th:value="${categ.detailName}">-->
<!--          </div>-->
<!--          <div class="layui-input-inline" style="width:160px;">-->
<!--            <label class="layui-form-mid">用于前端页面展示</label>-->
<!--          </div>-->
<!--        </div>-->

        <div class="layui-form-item">
          <label class="layui-form-label layui-form-required">计价器名称：</label>
          <div class="layui-input-inline">
            <input type="text" name="tariffName" autocomplete="off" maxlength="20" class="layui-input" th:value="${categ.tariffName}"
                   lay-verify="required">
          </div>
        </div>

        <!--<div class="layui-form-item">-->
          <!--<label class="layui-form-label">服务时长：</label>-->
          <!--<div class="layui-input-inline">-->
            <!--<input type="text" name="serviceMinutes" autocomplete="off" maxlength="20" class="layui-input" th:value="${categ.serviceMinutes}"-->
                   <!--lay-verify="serviceMinutes">-->
          <!--</div>-->
            <!--<span style="color: #9F9F9F;">对上门-服务完成的时长限制单位：分钟</span>-->
        <!--</div>-->

        <div class="layui-form-item" style="display: none">
          <label class="layui-form-label layui-form-required">计价器状态：</label>
          <div class="layui-input-block">
            <input name="tariffStatus" value="2">
          </div>
        </div>

        <div class="layui-form-item">
          <label class="layui-form-label layui-form-required">排序ID：</label>
          <div class="layui-input-inline" style="width:200px;">
            <input type="text" lay-verify="required|sort" name="sort" th:value="${categ.sort}" autocomplete="off" class="layui-input"/>
          </div>
          <div class="layui-input-inline" style="width:160px;">
            <label class="layui-form-mid" style="color: #9F9F9F;">数字越小，在越前面</label>
          </div>
        </div>
        <!--按钮栏
            置于form标签内的最下方，
            主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
            -->
        <div class="layui-form-item submit">
          <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
            <button onclick="parent.layui.element.tabDelete('layadmin-layout-tabs', window.location.pathname + window.location.search)" class="layui-btn layui-btn-primary" id="cancel">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">
  var json = {
    parentId: [[${parentId}]],
      categ:[[${categ}]]
  };

  layui.config({
    base: "/static/lay/"
  }).extend({
    index: "lib/index",
    art_categ_show_detail2: "categroy/show/zmn.art.categ.edit2",
  }).use(['index', 'art_categ_show_detail2']);

</script>